#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>

using namespace std;

int main() {
    string str;
    string digit = "";
    cin >> str;
    for (int i = 0;i < str.size();i++)
    {
        string tmp;
        for (int j = i;j < str.size();j++)
        {
            if (str[j] < '0' || str[j] > '9')
            {
                break;
            }
            tmp += str[j];
        }
        if (tmp.size() > digit.size())
        {
            digit = tmp;
        }
    }

    cout << digit << endl;
    return 0;
}